package com.neo.impatient.C02_flowControl.C02_08_defaultParm

object FunParm {


  /**
    * 默认参数left right
    * @param str
    * @param left
    * @param right
    * @return
    */
  def decorate(str: String, left: String = "[", right: String = "]") = left + str + right


  def main(args: Array[String]): Unit = {
    println(decorate("Hello world"))


    /**
      * 可以直接指定参数值，可以无序
      */
    println(decorate(str = "aaa", left = "<<<<", right = ">>>>"))

  }

}
